package com.ruoyi.system.monitortask.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.monitortask.domain.MonitorTaskGoods;
import com.ruoyi.system.monitortask.domain.req.MonitorTaskReq;
import com.ruoyi.system.monitortask.vo.MonitorTaskGoodsVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 账号监控任务关联商品表(monitor_task_goods)表数据库访问层
 *
 * @author zyy
 * @date 2024-06-21 15:56:49
 */
public interface MonitorTaskGoodsMapper extends BaseMapper<MonitorTaskGoods> {

    List<MonitorTaskGoodsVo> getMonitorTaskGoodsListDB(@Param("monitoTaskId") Long monitoTaskId);

    List<MonitorTaskGoodsVo> getMonitorTaskGoodsListZS(@Param("monitoTaskId") Long monitoTaskId);


    @InterceptorIgnore(tenantLine = "1")
    List<MonitorTaskGoodsVo> getMonitorTaskGoodsListDB2(@Param("monitoTaskId") Long monitoTaskId);
    @InterceptorIgnore(tenantLine = "1")
    List<MonitorTaskGoodsVo> getMonitorTaskGoodsListZS2(@Param("monitoTaskId") Long monitoTaskId);

    int deleteByMonitoTaskId(@Param("monitoTaskId") Long monitoTaskId);

    @Delete("delete from monitor_task_goods where monitor_task_id = #{monitoTaskId} and goods_id = #{goodsId}")
    int deleteByMonitoTaskIdAndGoodsId(@Param("monitoTaskId") Long monitoTaskId, @Param("goodsId") Long goodsId);


    List<Map<String, Object>> statistics(MonitorTaskReq req);

    List<String> allUser();

}

